package com.hightrast.service.compareToData.stage.impl;

import com.hightrast.service.api.entity.RastOrderProductRefundItems;
import com.hightrast.service.compareToData.stage.EntityComparator;

import java.util.Objects;

/**
 * 订单商品退款项 比较策略实现
 */
public class RastOrderProductItemRefundComparator implements EntityComparator<RastOrderProductRefundItems> {
    @Override
    public boolean areEqual(RastOrderProductRefundItems newEntity, RastOrderProductRefundItems oldEntity) {
        return Objects.equals(newEntity.getQuantity(), oldEntity.getQuantity()) &&
                Objects.equals(newEntity.getLineItemId(), oldEntity.getLineItemId()) &&
                Objects.equals(newEntity.getStatus(), oldEntity.getStatus()) &&
                Objects.equals(newEntity.getSubtotal(), oldEntity.getSubtotal())
                ;
    }
}